
public class Phonebook implements IPhonebook{
	//instance variable
	private DLL dll;
	
	//default constructor
	public Phonebook(){
    dll=new DLL();
 
	} 
	
	//accessors & Mutators
	public DLL getDLL(){
		return dll;
	}
	public void setDLL(DLL what){
		dll=what;
	}
	
	//General Methods
	
	
	//add method, returns true if element is added, false otherwise
	public boolean add(Record record){
		if(dll.add(record)){
			return true;
		}
		else{
			return false;
		}
		
		
		
	}
		//returns true if record is found in list, invokes dll method
	public boolean contains(Record record){
		if(dll.contains(record)){
			return true;
		}
		else{
			return false;	
		}
	}
		//if element if removed return true, else return false
	public boolean remove(Record record){
		
		if(dll.remove(record)){
			return true;
		}
		else{
			return false;
		}
	}
		//converts Phonebook to String, invokes DLL toString method, called in Driver Class
	public String toString(){
		String a="";
		a=dll.toString();
		return a;
	}
	
	
	

}
